package edu.mis.modules.index;

import com.jfinal.aop.Clear;
import com.jfinal.core.Controller;

import edu.mis.model.Resource;
import edu.mis.model.User;
import edu.mis.modules.user.LoginInterceptor;

/**
 * 首页控制器
 */
public class IndexController extends Controller {
	@Clear({LoginInterceptor.class}) //login方法不被全局拦截器拦截
	public void login() {
		renderFreeMarker("/login.html");
	}
	@Clear({LoginInterceptor.class}) //login方法不被全局拦截器拦截
	public void weixin() {
		renderFreeMarker("/weixin/index.html");
	}
	public void index() {
		User user= getSessionAttr("loginUser");
		setAttr("resource", Resource.dao.findMenuByUser(user.getId()));
		renderFreeMarker("/index.html");
	}
	public void help() {
		renderFreeMarker("/help.html");
	}
}





